<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[id]" value="{$row.id}">
    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('场馆名称')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
	<div class="form-group" data-field="manager">
		<label for="c-manager" class="control-label col-xs-12 col-sm-2">{:__('管理员')}</label>
		<div class="col-xs-12 col-sm-8">
			<div class="input-group">
				<input id="c-manager" class="form-control" name="row[manager]" type="text" value="{$row.manager|htmlentities}" onfocus="this.blur()" placeholder="请选择场馆管理员">
				<input id="c-managerid" name="row[managerid]" type="hidden" value="{$row.managerid|htmlentities}" />
				<span class="input-group-btn">
                    <a href="javascript:" data-url="reservation/managers" class="btn btn-primary btn-select-managers" title="选择管理员" style="margin-left:3px;"><i class="fa fa-list"></i> 选择管理员</a>
                </span>
				<span class="msg-box n-right"></span>
			</div>
		</div>
	</div>
    <div class="form-group">
        <label for="c-telephone" class="control-label col-xs-12 col-sm-2">{:__('联系电话')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-telephone" data-rule="required" class="form-control" name="row[telephone]" type="text" value="{$row.telephone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-address" class="control-label col-xs-12 col-sm-2">{:__('场馆地址')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-opentime" class="control-label col-xs-12 col-sm-2">{:__('开放时间')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-opentime" data-rule="required" class="form-control" name="row[opentime]" type="text" value="{$row.opentime|htmlentities}">
        </div>
    </div>
	<div class="form-group">
        <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('场馆介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="" class="form-control editor" rows="15" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="c-img" class="control-label col-xs-12 col-sm-2">{:__('场馆图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-img" data-rule="required" class="form-control" size="50" name="row[img]" type="text" value="{$row.img}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-img" class="btn btn-danger faupload" data-input-id="c-img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-img" class="btn btn-primary fachoose" data-input-id="c-img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-img"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-img"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('正常'), '0'=>__('禁用')], $row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>